<template>
    <div class="nav">
        <div class="line"></div>
        <div class="nav_bottom">
            <div class="item" @click="pageToHome">
                <div class="item_img1">

                </div>

                <div class="txt">第二课堂</div>
            </div>
            <div class="item" @click="pageToMyPage">
                <div class="item_img2">

                </div>

                <div class="txt">我的</div>
            </div>
        </div>

    </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
const router = useRouter()




const pageToHome = () => {
    router.push('/home')
}
const pageToMyPage = () => {
    router.push('/my')
}
</script>

<style scoped>
.nav {
    position: fixed;
    bottom: 0px;
    width: 100%;
    background-color: white;

    .line {
        width: 100%;
        height: 10px;
        background-image: url('../../assets/images/homepage/line.png');
        background-size: contain;
    }

    .nav_bottom {

        display: flex;
        flex-direction: row;
        justify-content: space-around;

        .item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-around;
            padding: 10px;



        }

        .item_img1 {
            width: 18px;
            height: 18px;
            background-image: url('../../assets/images/icon1.png');
            background-size: cover;
        }

        .item_img2 {
            width: 18px;
            height: 18px;
            background-image: url('../../assets/images/icon2.png');
            background-size: cover;
        }


        .txt {
            font-size: 12px;
            padding-top: 5px;

        }
    }
}
</style>